<template>
  <!-- 两种写法对比，第二种相当于第一种的语法糖 -->
  <InputComponent
    :message="message"
    @update:rootMessage="message = $event"
    v-model:anotherMessage="anotherMessage"
  ></InputComponent>
  <h2>{{ message }}</h2>
  <h2>{{ anotherMessage }}</h2>
</template>

<script>
import InputComponent from './InputComponent.vue'
export default {
  components: { InputComponent },
  data() {
    return {
      message: 'message from root',
      anotherMessage: 'another message from root'
    }
  }
}
</script>

<style scoped></style>
